sacarUna :: Eq a => a -> [a] -> [a]
sacarUna x l = if elem x l then fst (listaDivididaPorElem) ++ tail (snd (listaDivididaPorElem)) else l
				where 
				listaDivididaPorElem = break (==x) l
				
permutaciones :: [a] -> [[a]]
permutaciones [] = [[]]
permutaciones (x:xs) = [ intercalar x rec indice | rec <- permutaciones xs, indice <- [0..length rec] ]

intercalar :: a -> [a] -> Int -> [a]
intercalar x l indice = fst (splitAt indice l) ++ [x] ++ snd (splitAt indice l)